<%@page import="org.apache.jasper.tagplugins.jstl.core.Import"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.List"%>
<%@ page import="tw.com.msig.b2c.car.setting.vo.AnnounceVo"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/layout/meta.jsp" />
</head>
<body>
	<div id="header">
		<jsp:include page="/layout/header.jsp" />
	</div>
	<div id="navigator">
		<jsp:include page="/layout/navigator.jsp" />
	</div>
	<div id="container">
		<a class="btn btn-success"
			href="<%=request.getContextPath()%>/settings/announce.do?sActionType=add">新增</a>
		<table class="table table-hover">
			<tr>
				<td>功能</td>
				<td>建立者</td>
				<td>標題</td>
				<td>內文</td>
				<td>修改者</td>
				<td>修改時間</td>
			</tr>

			<%
				List<AnnounceVo> models = (List<AnnounceVo>) request
						.getAttribute("models");

				for (AnnounceVo model : models) {
					pageContext.setAttribute("model", model);
			%>
			<tr>
				<td><a class="btn btn-primary"
					href="<%=request.getContextPath()%>/settings/announce.do?sActionType=edit&id=<%=model.getId()%>">修改</a>
					<a class="btn btn-danger"
					href="<%=request.getContextPath()%>/settings/announce.do?sActionType=delete&id=<%=model.getId()%>">刪除</a></td>
				<td>${ model.creator}</td>
				<td>${ model.title}</td>
				<td>${ model.content}</td>
				<td>${ model.modifier}</td>
				<td>${ model.modifyTime}</td>
			</tr>
			<%
				}
			%>

		</table>
	</div>
</body>
</html>